Skip to main content

All Questions

Tagged with
6votes
2answers
131views

Splitting Rust Strings into variables

I'm learning Rust and I'd like advice on how to make my code more idiomatic. I have a set of entries that are colon separated string-number pairs, a name and a size, like so: ...
Carcophan's user avatar
7votes
1answer
84views

Simple calculator app in Rust

To learn about Rust and parsing, I wrote a simple calculator that can solve problems involving the four basic operations (+, -, *, /) as well as exponentiation. For the sake of simplicity and ...
Arbel Groshaus's user avatar
2votes
0answers
48views

N-Body simulator in Rust implementing Barnes Hut and Leapfrog

I have written a N-body simulator in Rust implementing Barnes Hut algorithm and Leapfrog integrator. My code seems to work fine, but I'd like to review on techniques which can improve performance ...
epestr's user avatar
2votes
1answer
247views

Roman Numerals Look and Say in rust (BIO 2020 Q1)

I was practicing question 1a of the British Informatics Olympiad 2020 past paper. The Roman look-and-say description of a string (of Is, Vs, Xs, Ls, Cs, Ds and Ms) is made by taking each block of ...
sbottingota's user avatar
3votes
1answer
107views

Type-state pattern and state management for credentials struct used with Spotify web API

I am implementing authentication with the Spotify web API as part of a larger project. Yes I know there are already crates that can handle it for me but that is no fun. I am implementing the auth code ...
flakpm's user avatar
2votes
0answers
105views

Rust implementation of a BTree

I'm studying rust, and I decided to implement a BTree as a way of learning the language. Can anyone give me suggestions on the code? As the language has no inheritance, and we must replace it with ...
Lucas Paixão's user avatar
3votes
1answer
87views

Basic rust Celsius to Fahrenheit conversion

I've been following the rust book, and I made a Celsius to Fahrenheit converter as it advised me. After a bit, I came up with this code; however in my opinion, there's a lot of unnecessary parts that ...
icy icy's user avatar
5votes
1answer
182views

Sand simulation in Rust

I am working on this project to learn Rust and a bit of Web Assembly. The rendering is done in JavaScript which I do not really care about so I will not post. I would like to receive some harsh ...
Doruk's user avatar
4votes
1answer
79views

Parsing command line arguments with CLI

I'm new to rust, and this is my very first rust program. I'd like to write a simple CLI app to help me running some Git command on multiple repositories. Since my goal is learning rust, I force myself ...
Marcus's user avatar
6votes
3answers
724views

Rust: Command line menu in ASCII table

Specific areas in which I'd love to get feedback: Is it good to have the Command struct own the Strings (...
m01010011's user avatar
10votes
2answers
1kviews

Beginner Rust Todo app

I am trying to use the practices that I have learnt from the rust book. Any advice is welcome. Please feel free to be as nitpicky as possible. ...
Doruk's user avatar
3votes
0answers
70views

Simple truss stiffness matrix calculator in Rust

I recently developed this calculator for some FEA homework i had. I'm still trying to familiarize myself with fundamental rust concepts like the ownership and borrowing. Pls let me know if there is ...
vvurd's user avatar
3votes
0answers
98views

Rust ffi wrapper for barcode scanning library

I'm the maintainer of the zxing-cpp library, a barcode image processing library written in C++. I recently decided to invest in a Rust wrapper library/crate that is now on crates.io. It is basically a ...
axxel's user avatar
3votes
0answers
53views

Assign unique identifiers to binary matrices using a binary tree

Context I want to build a transposition table where the game states are binary square matrices which size MATRIX_SIZE is known at compile time. Rather than storing ...
Tristan Nemoz's user avatar
6votes
1answer
175views

Mandelbrot Set image generator in Rust

I'm learning Rust, and as-is tradition, I'm starting out with a Mandelbrot Set explorer as my first project (although, it just produces images so far). When run, it just creates and writes an image to ...
Carcigenicate's user avatar

153050per page
close